﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace AuroraPlatform.View.UserManager
{
    public class RoleConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            //1普通用户、2经理、3数据导入者、4系统管理员
            uint intValue = uint.Parse(value.ToString());
            switch (intValue)
            {
                case 1:
                    return "普通用户";
                case 2:
                    return "高级用户";
                case 3:
                    return "数据库管理员";
                case 4:
                    return "系统管理员";
            }
            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
